// components/common/blindbox-card.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    box: {
      type: Object,
      value: {}
    },
    isSelected: {
      type: Boolean,
      value: false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onTap() {
      const box = this.properties.box;
      this.triggerEvent('click', { box });
    },
    
    onSelect(e) {
      e.stopPropagation(); // 阻止冒泡，避免触发onTap
      const box = this.properties.box;
      this.triggerEvent('select', { box });
    }
  }
}) 